<header class="jumbotron subhead" id="overview">
    <div class="container">
        <h2>源自相同起点，演绎不同精彩！</h2>
        <p class="lead"></p>
    </div>
</header>

<div id="main-container" class="container">
    <section>
            <div class="span12">
                <div class="control-group">
                  <label class="control-label">旧密码</label>
                  <div class="controls">
                      <input type="text" id="old_password" style="height: 30px;" class="span3" placeholder="请输入旧密码" name="old_password">
                  </div>
                </div>
                <div class="control-group">
                  <label class="control-label" for="inputPassword">新密码</label>
                  <div class="controls">
                    <input type="password" id="new_password" style="height: 30px;" class="span3" placeholder="请输入新密码"  name="new_password">
                  </div>
                </div>
                <div class="control-group">
                  <label class="control-label" for="inputPassword">确认新密码</label>
                  <div class="controls">
                    <input type="password" id="affirm_password" style="height: 30px;" class="span3" placeholder="请输入密码"  name="affirm_password">
                  </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <button type="button" class="btn" onclick="submitData(this)">提 交</button>
                    </div>
                </div>
            </div>
    </section>
</div>


<script>
    
    function submitData(btn)
    {
        
        $(btn).attr('disabled',"true");
        
        $.post(api_domain + '/api.php/common/login.html', {access_token:access_token,username:$('#username').val(),password:$('#password').val()}, success, "json");
        return false;
        
        function success(data)
        {
            
            if (data.code != 0) {  toast.error(data.msg); $(btn).removeAttr("disabled"); return; }
            
            Cookies.set('login_info', data.data);
            
            toast.success('登录成功');
            
            setTimeout(function(){ window.location.href = '/'; }, 500);
        }
    }
</script>